//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "satellite.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)

Satellite::Satellite(GLfloat altura,int lados,int capas, double rad){

         Cilindro * tronco = new Cilindro(rad,rad,altura/5.0*4.,lados,capas);
         Tablero * base1 = new Tablero(rad*6.,rad*1.5,altura/10.,3,3,3);
         Tablero * base2 = new Tablero(rad*6.,rad*1.5,altura/10.,3,3,3);
         Cilindro * punta = new Cilindro(.5,rad,altura/5.0,lados,capas);



         PV * v = new PV(0,0,altura/5.*3.9,0);
         punta->marco_de_coordenadas-> traslate(v);
         delete v;


         v = new PV(-rad*3.+rad*0.75-rad/2.,+rad/2.,0,0);
         base2->marco_de_coordenadas->traslate(v);
         delete v;
         v = new PV(1,0,0,0);
         base2->marco_de_coordenadas->rotate(90,v);
         delete v;

         v = new PV(-rad/2.,-rad*3.-rad*0.75+rad/2.,0,0);
         base1->marco_de_coordenadas->traslate(v);
         delete v;
         v = new PV(0,0,1,0);
         base1->marco_de_coordenadas->rotate(90,v);
         delete v;
         v = new PV(1,0,0,0);
         base1->marco_de_coordenadas->rotate(90,v);
         delete v;





         objetos->anadir(tronco);
         objetos->anadir(punta);
         objetos->anadir(base1);
         objetos->anadir(base2);
}

